package group2assignone.ucm.manager;

import group2assignone.model.Flight;
import group2assignone.ucm.UCController;
import group2assignone.view.manager.EditFlightView;
/**
 * Use Case: Show Edit Flight View                                          <br>
 * Pre-condition: Manager has clicked edit from edit flight view.           <br>
 * Post-condition: UI is updated.                                           <br>
 * 1. system shows flight details for editing.                              <br>
 * @author group2                                                           <br>
 */
public class UCShowEditFlightView implements UCController {

    private EditFlightView editView = new EditFlightView();
    private Flight f = new Flight();

    /**
     * sets view and flight
     * @param eView
     * @param flight
     */
    public UCShowEditFlightView(EditFlightView eView, Flight flight) {
        editView = eView;
        f = flight;
    }
    
    /**
     *Use Case Controller - allows the user to edit flight details.
     */
    @Override
    public void run() {
        //1. system shows flight details for editing.
        editView.editFlightDetails(f); 
    }
}
